< previous page page_608 next page >

Page 608
Setting Up the RDC
Setting up the RDC for use in your program is also very similar to setting up the Data control. Before you can use the RDC, you must first add it to your project. You do this by using the Components dialog box, which you access by choosing the Components item from the Project menu. After you close the dialog box, the RemoteData control is added to your toolbox.
note.gif The RemoteData control is available only in the Enterprise Edition of Visual Basic. Also, if you did a custom installation of the Enterprise Edition and opted not to install the RemoteData control, it does not appear as one of the available controls in the Custom Controls dialog box. In this case, you need to reinstall that portion of Visual Basic. square.gif

To set up the RemoteData control, follow these steps:
1. Draw the RemoteData control on your form.
2. Set the Name and Caption properties of the RDC to values that have meaning to you.
3. Set the DataSourceName property. You can enter a value or choose one from the drop-down list.
4. Set the SQL property to a valid SQL statement that specifies the information you need.
As stated in step 3, you can choose the DataSourceName value from a drop-down list. This list contains every registered ODBC data source on your system. An example of this list is shown in Figure 27.9.
0608-01.jpg
Figure 27.9
You can choose from a list of
available ODBC data sources
when setting the 
DataSoruceName.
After you have set up the remote data control, you then can attach bound controls to it by setting the DataSource property. As shown in Figure 27.10, a drop-down list in the DataSource property contains the names of any remote data controls or data controls on the current form. After the DataSource property has been set, you can select the DataField property from a list, just as you did for the controls bound to a data control.

 
< previous page page_608 next page >